package demo0506;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Test03 {
    public static void main(String[] args) throws IOException {
        String filePath = "新建文本文档 (2).txt";
        try (BufferedWriter bw = new BufferedWriter(new FileWriter(filePath, true))) {
            bw.write("\n这是新写入的内容");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

